package com.ymatou.iapi.liveseller.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.liveseller.parameter.ShutdownLiveInfoBean;
import com.ymatou.iapi.liveseller.service.ShutdownLiveInfoCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.business.service.LiveRoomCallService;
import com.ymttest.database.model.LiveRoom;
import com.ymttest.database.sqlwapper.LiveRoomWapper;
/**
*运营端强制关停直播
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_ShutdownLiveInfo{
	private static ShutdownLiveInfoBean shutdownliveinfoBean;
	private static ShutdownLiveInfoCall shutdownliveinfoCall;
	private static LiveRoomWapper livesWapper ;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("运营端强制关停直播");
	}

	@Before
	public void caseUp() {
		shutdownliveinfoBean=new ShutdownLiveInfoBean();
		shutdownliveinfoCall=new ShutdownLiveInfoCall();
		livesWapper=new LiveRoomWapper();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(shutdownliveinfoCall.getOpurl());
		livesWapper=null;
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	//运营功能未做
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_ShutdownLiveInfo_001() {
		Logger.start(true,"未开始直播运营端强制关停直播成功");
		try {
			LiveRoom createlive = LiveRoomCallService.CreateSellerLive(LiveRoomCallService.initCreatesellerliveBean(null));
			shutdownliveinfoBean.setLiveId(createlive.getId());
			shutdownliveinfoBean.setStopReson("autoTest运营强制关闭");
			shutdownliveinfoCall.setData(shutdownliveinfoBean);
			shutdownliveinfoCall.callService();			
			Logger.verifyEquals("200", shutdownliveinfoCall.getString("Code"), "验证Code");
			createlive=livesWapper.selectLiveRoomById(createlive.getId());
			Logger.verifyEquals(10, createlive.getLiveStatus() ,"验证LiveStatus");
			Logger.verifyEquals(shutdownliveinfoBean.getStopReson(), createlive.getStopReason() ,"验证StopReason");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P3.class})
	@TestCase
	@Ignore
	public void Tc_ShutdownLiveInfo_002() {
		Logger.start(true,"不输入liveid失败");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			shutdownliveinfoCall.setData(shutdownliveinfoBean);
			shutdownliveinfoCall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P3.class})
	@TestCase
	@Ignore
	public void Tc_ShutdownLiveInfo_003() {
		Logger.start(true,"不输入StopReson失败");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			shutdownliveinfoCall.setData(shutdownliveinfoBean);
			shutdownliveinfoCall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	@Ignore
	public void Tc_ShutdownLiveInfo_004() {
		Logger.start(true,"status7已关闭直播运营端强制关停失败");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			shutdownliveinfoCall.setData(shutdownliveinfoBean);
			shutdownliveinfoCall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	@Ignore
	public void Tc_ShutdownLiveInfo_005() {
		Logger.start(true,"status8已关闭直播运营端强制关停失败");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			shutdownliveinfoCall.setData(shutdownliveinfoBean);
			shutdownliveinfoCall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	@Ignore
	public void Tc_ShutdownLiveInfo_006() {
		Logger.start(true,"status9已关闭直播运营端强制关停失败");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			shutdownliveinfoCall.setData(shutdownliveinfoBean);
			shutdownliveinfoCall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P2.class})
	@TestCase
	@Ignore
	public void Tc_ShutdownLiveInfo_007() {
		Logger.start(true,"status10已关闭直播运营端强制关停失败");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			shutdownliveinfoCall.setData(shutdownliveinfoBean);
			shutdownliveinfoCall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_ShutdownLiveInfo_008() {
		Logger.start(true,"已经开始直播运营端强制关停直播成功");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			shutdownliveinfoCall.setData(shutdownliveinfoBean);
			shutdownliveinfoCall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_ShutdownLiveInfo_009() {
		Logger.start(true,"已经断流直播运营端强制关停直播成功");
		try {
			//TODO 补全case代码
			org.junit.Assert.fail();
			shutdownliveinfoCall.setData(shutdownliveinfoBean);
			shutdownliveinfoCall.callService();			
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}